home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / dcom / modems-part2 / 10972 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: morris.vip.best.com!user
  2. From: morris@best.com (Paul Morris)
  3. Newsgroups: comp.dcom.modems
  4. Subject: Re: Arrow keys
  5. Date: Sat, 13 Apr 1996 22:52:59 -0700
  6. Organization: Best Internet Communications
  7. Message-ID: <morris-1304962252590001@morris.vip.best.com>
  8. References: <4kp32v$jom@monet.ICSI.Net>
  9. NNTP-Posting-Host: morris.vip.best.com
  10.  
  11. In article <4kp32v$jom@monet.ICSI.Net>, cdbiem@roo.netrax.net (Charles
  12. Biemiller X0024) wrote:
  13.  
  14. > What is the proper byte to send when the arrow keys are pressed? I am
  15. > assembling a communications program and I set the arrow keys to send the
  16. > following to the COM port:
  17. >         KEY             BYTE            
  18. >         DOWN    =       0EH   (CTRL+N)
  19. >         UP      =       10H   (CTRL+P)
  20. >         LEFT    =       02H   (CTRL+B)
  21. >         RIGHT   =       06H   (CTRL+F)
  22. > While this works fine with most programs I am connected to, some do not
  23. > move the cursor at all. Please let me know what are the proper bytes to
  24. > send to the COM port for the arrow keys.
  25. > Thanks,
  26. > Charlie Biemiller
  27.  
  28.  
  29. I think the correct assignment is as follows:
  30.  
  31. UP       = <ESC>OA
  32. DOWN     = <ESC>OB
  33. RIGHT    = <ESC>OC
  34. LEFT     = <ESC>OD
  35.  
  36. Note that each key send 3 bytes.  The first is <ESCAPE>, that is,
  37. Control-[ (ascii 27).  The second byte is the letter "O" (ascii 79).
  38. The third byte is one of the letters "A", "B", "C" or "D" (ascii 65-68)
  39. depending on the direction.
  40.  
  41. The ascii codes given here,  27, 79, 65, 66, 67, 68, are in decimal.
  42. The hex equivalents would be 1B, 4F, 41, 42, 43, 44.
  43.  
  44. Paul
  45.